<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>密钥检测</title>
    <script type="text/javascript" src="http://www.cornify.com/js/cornify.js"></script>
</head>
<body>
    <script>
        const theKey = 'happy'
        const storageKey = []

        // 键盘按键
        addEventListener('keyup',(e) => {
            storageKey.push(e.key)
            storageKey.splice(-storageKey.length-1, storageKey.length - theKey.length)

            if(storageKey.join('').includes(theKey)){
                // console.log(1);
                cornify_add()
            }
        })
    </script>
</body>
</html>